﻿CREATE PROCEDURE [Messenger].[SP_Messaggio_I]
	@MessaggioID uniqueidentifier OUTPUT, 
	@Sender nvarchar(50),
	@Receiver nvarchar(50),
	@TestoMessaggio nvarchar(MAX),
	@IsDelivered bit,
	@IsRead bit,
	@TimeStamp_Insert datetime
AS
	SET @MessaggioID = NEWID()

	INSERT INTO [Messenger].[Messaggio](MessaggioID, Sender, Receiver, TestoMessaggio, IsDelivered, IsRead, TimeStamp_Insert)
	VALUES(@MessaggioID, @Sender, @Receiver, @TestoMessaggio, @IsDelivered, @IsRead, @TimeStamp_Insert)
RETURN 0